package com.mapper;

import com.bean.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @Author:wsc
 * @Date:2025/9/26-21:47-18
 */

public interface UserMapper2 {
    @Select("SELECT * FROM admin WHERE adminId = #{adminId}")
    User selectUserById(int id);
    @Insert("INSERT INTO admin(adminId,adminName,password) values(#{adminId},#{adminName},#{password})")
    int insertUser(User user);
    @Update("update admin set adminName = #{adminName},password = #{password} WHERE adminId = #{adminId}")
    int updateUser(User user);
    @Delete("DELETE FROM admin WHERE adminId = #{adminId}")
    int deleteUserById(int id);
}
